package com.xzl.org.learning_situation_analysis.service.Impl;

import com.xzl.org.learning_situation_analysis.dao.QuestionTypeMapper;
import com.xzl.org.learning_situation_analysis.entity.QuestionType;
import com.xzl.org.learning_situation_analysis.service.QuestionTypeService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author 夏智力
 * @FileName QuestionTypeServiceImpl
 * @date 2022/4/15 13:47
 * @Software: IntelliJ IDEA
 */
@Service
public class QuestionTypeServiceImpl implements QuestionTypeService {

    @Autowired
    private QuestionTypeMapper questionTypeMapper;

    @Override
    public QuestionType selectById() {
        return questionTypeMapper.selectById();
    }

    @Override
    public int insertQuestionType(QuestionType questionType) {
        questionType.setReleaseTime(new Date(System.currentTimeMillis()));
        return questionTypeMapper.insertQuestionType(questionType);
    }
}
